{extends 'base/site2.html'}
{block name="page_header"}{include file="common/header.html" inline}{/block}
{block name="page_nav"}{include file="common/slide-nav.html" inline}{/block}
{block name="page_styles"}
<link rel="stylesheet" type="text/css" href="/css/mediation/role/index.css" />

{/block}
{block name="page_section"}

{*    <ol class="breadcrumb pad-no">*}
{*        <li><a href="/">{$sysname}</a></li>*}
{*        <li class="active">系统管理-权限管理</li>*}
{*    </ol>*}
    <div class="sessionPage bg-fff">
        <div class="page-header">
          <div class="left">
            <span class="line"></span>
            <strong class="tit">权限管理</strong>
          </div>
          <div class="right">
            <a href="/role/add">
              <button type="button" class="btn btn-info textright">新增</button>
            </a>
          </div>
        </div>
    <div style="width: 95%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    overflow-x: scroll;">

    <table class="table table-striped table-bordered table-hover text-nowrap">
            <thead>
                <tr>
                    <th scope="col">序号</th>
                    <th scope="col">用户组</th>
                    <th scope="col">添加时间</th>
                    <th scope="col"  class="fix-ele">操作</th>
                </tr>
            </thead>
            <tbody>
                {if $list}
                    {foreach from=$list key=key item=item}
                        <tr>
                            <td>{$item['id']}</td>
                            <td>{$item['title']}</td>
                            <td>{$item['add_time']|date_format:"%Y-%m-%d %H:%M:%S"}</td>
                            <td  class="fix-ele">
                                <a href="/role/edit?id={$item['id']}">管理</button></a>
                                {if $item['id'] != 1}
                                <a href="javascript:;" data-toggle="modal" data-target=".delmodal" data-id="{$item['id']}" role-click="modalshow">删除
                                </a>
                                {/if}
                            </td>
                        </tr>
                    {/foreach}
                {/if}
            </tbody>
        </table>
    </div>
        <div class="clearfix pad-no text-nowrap" style="margin-top: 20px;">

            {include file="base/pagenav.html"  action="/role/index" pagenum=$curPageNum inline}
            <span style="float:right;margin-right: 10px">共 {$totalnum} 条</span>
        </div>
        <div class="modal fade delmodal" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
            <div class="modal-dialog modal-sm" role="document">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title">确认删除这条数据？</h4>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                        <button type="button" class="btn btn-danger" role-click="del" data-url="/role/del" data-id="">删除</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
{/block}
{block name="page_scripts"}
<script type="text/javascript" src="/js/mediation/del/del.min.js" init="mediation/del/del"></script>



{/block}

